﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace RockBus.DataContracts
{
    public class CaseInsensitiveStringDictionary<TValue> : Dictionary<string, TValue>
    {
        public CaseInsensitiveStringDictionary()
            : base(StringComparer.InvariantCultureIgnoreCase)
        {
        }

        public void Merge(CaseInsensitiveStringDictionary<TValue> other)
        {
            if (null != other)
            {
                foreach (var kvp in other)
                {
                    this[kvp.Key] = kvp.Value;
                }
            }
        }
    }
}
